package com.hudson.admin.interceptor;

/**
 * @Author: 渔小鲤
 * @DateTime: 2025/7/21 22:40
 **/
public class UserContext {

    private static ThreadLocal<String> UserInfo = new ThreadLocal<>();

    public static void setUserName(String username) {
        UserInfo.set(username);
    }

    public static String getUserName() {
        return UserInfo.get();
    }

    public static void clear() {
        UserInfo.remove();
    }
}
